package com.yqg.manage.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.yqg.manage.entity.Archive;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author suzhuang
 * @since 2023-07-05
 */
@Mapper
public interface ArchiveMapper extends MPJBaseMapper<Archive> {
    @Select("select DISTINCT pstage_id,pstage_name from archive where is_delete = 0")
    List<Archive> stageName();

    @Select("select document_id,document_name from archive  WHERE document_type=#{documentType} and pstage_id=#{pstageId} and is_delete=0")
    List<Archive> documentName(@Param("documentType") int documentType,@Param("pstageId")int pstageId);

    @Select("select template_no,document_name from archive  WHERE document_type=#{documentType} and  pstage_id=#{pstageId} and is_delete=0")
    List<Archive> documentTemp(@Param("documentType") int documentType,@Param("pstageId")int pstageId);
}
